﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Headquarter.Master" AutoEventWireup="true" CodeBehind="~/Suppliers.aspx.cs" Inherits="GUI.Headquarter.Suppliers" EnableViewState="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Fornecedores</title>
    <style>
        
        #suppliers
        {
            margin-top: 50px;    
        }
        
        #suppliers span
        {
            color: Red;
            width: 20%;    
        }
        
    </style>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>Fornecedores</h1>


    <fieldset>
        <legend>Adicionar novo fornecedor</legend>
        <label for='<%= name.ClientID %>'>Nome</label>
        <input id='name' runat='server' />

        <label for='<%= address.ClientID %>'>Morada</label>
        <input id='address' runat='server' />

        <asp:Button Text="Adicionar" runat="server" onclick="OnAddSupplier" />
    </fieldset>


    <div id="suppliers">
        Fornecedores:
        <% for (int i = 0; i < suppliers.Count; ++i)
           { %>
            
            <div>
                <span>Nome: </span><%= suppliers[i].Name %>
                <span>Morada: </span><%= suppliers[i].Address %>
            </div>
        <% } %>

    </div>    

</asp:Content>